package org.xtext.example.generator;

import com.google.inject.Inject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtext.generator.IFileSystemAccess;
import org.eclipse.xtext.generator.IGenerator;
import org.eclipse.xtext.xbase.compiler.JvmModelGenerator;
import org.eclipse.xtext.xbase.lib.InputOutput;
import org.xtext.example.generator.AgentMyGen;
import org.xtext.example.generator.GenUtils;

@SuppressWarnings("all")
public class AgentGenerator extends JvmModelGenerator implements IGenerator {
  @Inject
  private GenUtils util;
  
  public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
    String _plus = ("AgentGenerator starts resouce=" + resource);
    InputOutput.<String>println(_plus);
    String _plus_1 = ("AgentGenerator start fsa=" + fsa);
    InputOutput.<String>println(_plus_1);
    this.util.setFsa(fsa);
    this.util.setResource(resource);
    AgentMyGen _agentMyGen = new AgentMyGen();
    _agentMyGen.doGenerate(this.util, this);
  }
  
  public void genJava() {
    Resource _resource = this.util.getResource();
    IFileSystemAccess _fsa = this.util.getFsa();
    super.doGenerate(_resource, _fsa);
  }
}
